package edu.avans.hartigehap.domain;

import java.util.Date;

import javax.persistence.*;

@Entity
public class DiscountFixed extends Discount {
	private static final long serialVersionUID = 1L;
	
	/**
	 * A constructor for creating inactive discounts
	 * @param active
	 */
	public DiscountFixed()
	{
		super();
	}
	
	/**
	 * A constructor for creating active discounts
	 * @param active
	 */
	public DiscountFixed(Boolean active, Date date, double lValue){
		super(active, date, lValue);
	}

	@Transient
	public double calculate(double price){
		double finalprice = price - super.lValue;
		 return finalprice;
	}
}